package lfp.engine.extrapolation;

import lfp.engine.utils.TimeSeries;
import lfp.engine.IForecastModel;

/**
 * Created by IntelliJ IDEA.
 * Series: iceson
 * Date: 2006-4-24
 * Time: 15:48:08
 * To change this template use File | Settings | File Templates.
 */
public class ExtrapolationModel implements IForecastModel {

    public double[] forecast(double[] series, int series_Period, int forelength) {
        // data preparation
        TimeSeries hisData = new TimeSeries();
        hisData.SetSeries(series.length, series);
        TimeSeries foreData = new TimeSeries();
        foreData.SetSeries(forelength);

        // forecast
        MultiPointExtrapolation extra = new MultiPointExtrapolation();
        //SinglePointExtrapolation extra = new SinglePointExtrapolation();
        extra.Forecast(hisData, series_Period, foreData);

        return foreData.m_pSeries;
    }
}
